package com.mz.ozy.mvp.model;

import android.content.Context;

import com.mz.ozy.constants.Constants;
import com.mz.ozy.net.RetrofitUtils;
import com.mz.ozy.utils.JsonUtils;

import java.util.HashMap;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.ResponseBody;

public class JoinMemberModel {

    public Observable<ResponseBody> list(Context context) {
        Map<String, String> maps = new HashMap<>();
        return RetrofitUtils.getApiService(context).post(Constants.TransCode.TransCode10412, JsonUtils.requestJsonDate(maps), Constants.tokenId);
    }

    public Observable<ResponseBody> join(Context context, String phone, String fid, String gift, String payType, String payPwd) {
        Map<String, String> maps = new HashMap<>();
        maps.put("phone", phone);
        maps.put("fid", fid);
        maps.put("gift", gift);
        maps.put("payType", payType);
        maps.put("paypwd", payPwd);
        return RetrofitUtils.getApiService(context).post(Constants.TransCode.TransCode10401, JsonUtils.requestJsonDate(maps), Constants.tokenId);
    }

    public Observable<ResponseBody> handReport(Context context,  String userId, String phone, String fid, String gift, String payType, String payPwd) {
        Map<String, String> maps = new HashMap<>();
        maps.put("userId", userId);
        maps.put("phone", phone);
        maps.put("fid", fid);
        maps.put("gift", gift);
        maps.put("payType", payType);
        maps.put("paypwd", payPwd);
        return RetrofitUtils.getApiService(context).post(Constants.TransCode.TransCode10410, JsonUtils.requestJsonDate(maps), Constants.tokenId);
    }

}
